package com.woniu.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * manage
 * @author 
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Manage implements Serializable {
    private Integer mid;

    private String username;

    // @JsonIgnore // 隐藏该字段
    private String password;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")// 存入数据库
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")// 输出到前端
    private Date mtime;

    private Integer rid;

    private String mmobile;

    private String memail;

    /**
     * 1：状态正常,0：状态异常
     */
    private Boolean mstate;

    // 关联role表
    private Role role;

    private static final long serialVersionUID = 1L;
}